/**
 * @Author: Sagan
 * @Date: 2020/11/30 17:00
 */
package arr

// 判断一个数组是否包含一个指定的值，如果有返回true，否则false

func Includes(a []string, value string) bool {
	for i := 0; i < len(a); i++ {
		if value == a[i] {
			return true
		}
	}
	return false
}

func IncludesFloat(a []float64, value float64) bool {
	for i := 0; i < len(a); i++ {
		if value == a[i] {
			return true
		}
	}
	return false
}

func IncludesInt(a []int, value int) bool {
	for i := 0; i < len(a); i++ {
		if value == a[i] {
			return true
		}
	}
	return false
}

func IncludesInt64(a []int64, value int64) bool {
	for i := 0; i < len(a); i++ {
		if value == a[i] {
			return true
		}
	}
	return false
}

func IncludesUInt(a []uint, value uint) bool {
	for i := 0; i < len(a); i++ {
		if value == a[i] {
			return true
		}
	}
	return false
}

func IncludesUInt64(a []uint64, value uint64) bool {
	for i := 0; i < len(a); i++ {
		if value == a[i] {
			return true
		}
	}
	return false
}
